package com.whales.shared.model;

import java.io.Serializable;
import java.sql.Date;

import com.whales.shared.util.SessionUtil;

public class CommonVO implements Serializable {
	private static final long serialVersionUID = 1L;
	private String newId;
	private String id;
	private String[] ids;
	private String createId;
	private Date createDate;
	private String updateId;
	private Date updateDate;
	private String searchCategory;
	private String searchWordTxt;
	private int start;
	private int limit;
	private String createStrDate;
	private String updateStrDate;
	
	public String getCreateStrDate() {
		return createStrDate;
	}
	public void setCreateStrDate(String createStrDate) {
		this.createStrDate = createStrDate;
	}
	public String getUpdateStrDate() {
		return updateStrDate;
	}
	public void setUpdateStrDate(String updateStrDate) {
		this.updateStrDate = updateStrDate;
	}
	public int getStart() {
		return start;
	}
	public void setStart(int start) {
		this.start = start;
	}
	public int getLimit() {
		return limit;
	}
	public void setLimit(int limit) {
		this.limit = limit;
	}
	public String getSearchCategory() {
		return searchCategory;
	}
	public void setSearchCategory(String searchCategory) {
		this.searchCategory = searchCategory;
	}
	public String getSearchWordTxt() {
		return searchWordTxt;
	}
	public void setSearchWordTxt(String searchWordTxt) {
		this.searchWordTxt = searchWordTxt;
	}
	public String[] getIds() {
		return ids;
	}
	public void setIds(String[] ids) {
		this.ids = ids;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getCreateId() throws Exception {
		if(SessionUtil.getAttribute("login") != null){
			return ((LoginVO)SessionUtil.getAttribute("login")).getId();
		}else{
			return this.createId;
		}			
	}
	public void setCreateId(String createId) {
		this.createId = createId;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getUpdateId() throws Exception {
		if(SessionUtil.getAttribute("login") != null){
			return ((LoginVO)SessionUtil.getAttribute("login")).getId();
		}else{
			return this.updateId;
		}
	}
	public void setUpdateId(String updateId) {
		this.updateId = updateId;
	}
	public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	public String getNewId() {
		return newId;
	}
	public void setNewId(String newId) {
		this.newId = newId;
	}
}
